#ifndef _WORDCOUNT_MAPRED_H_
#define _WORDCOUNT_MAPRED_H_

//#include "stddefines.h"
#include "MapReduceScheduler.h"

typedef struct {
   long fpos;
   long flen;
   char *fdata;
   int unit_size;
} wc_data_t;
//enum {
//   IN_WORD = 0,
//   NOT_IN_WORD
//};

/** mystrcmp()
 *  Comparison function to compare 2 words
 */
int mystrcmp(const void *s1, const void *s2);

int mykeyvalcmp(const void *v1, const void *v2);

int wordcount_splitter(void *data_in, int req_units, map_args_t *out);

void wordcount_map(map_args_t *args) ;

void wordcount_reduce(void *key_in, void **vals_in, int vals_len);














#endif











